#!/usr/bin/python
# -*- coding: UTF-8 -*-

import requests
import time

def read_file(path):

    lines = None
    with open(path, encoding='utf-8') as f:
        lines = f.readlines()

    return lines


if __name__ == '__main__':

    filename = "C:\\Users\\1\\Desktop\\乌海事项同步url.txt"
    lines = read_file(filename)
    print(type(lines))
    print(lines)

    for line in lines:
        print(line.rstrip('\n'))
        try:
            requests.get(line, timeout=6000)
        except Exception as e:
            print(e)

        time.sleep(1)


